<?php

namespace App\Policies;

use App\User;
use App\Post;

class PostPolicy{

    //规则一，超级管理员
    public function show(User $user, Post $post)
    {
        //return $user->id === $post->user_id;
        return $user->id === 1;

        //return $user->isManager() ? true :false;



    }
    //规则二，具有审核权限
    public function  auditMoney_show(User $user, Post $post)
    {
        return $user->id === 2;
    }

    public function  shownot(User $user, Post $post)
    {
        return $user->id === 3;
    }

}